package com.firefightingiot.firefightingiot.web.web;

import cn.hutool.json.JSONObject;
import com.firefightingiot.firefightingiot.common.base.BaseController;
import com.firefightingiot.firefightingiot.support.annotaion.Action;
import com.firefightingiot.firefightingiot.support.annotaion.At;
import com.firefightingiot.firefightingiot.support.model.RespEntity;
import com.firefightingiot.firefightingiot.web.service.DeviceInfoService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

/**
 * @author Yang
 */
@Action
@RequestMapping(value="DeviceInfo")
public class DeviceInfoController extends BaseController {

    @Resource
    private DeviceInfoService deviceInfoService;


    @At(value = "/add", method = RequestMethod.POST)
    public RespEntity add(@RequestBody(required = false) JSONObject jsonParam)  throws Exception {
        return deviceInfoService.DeviceInfo(jsonParam);
    }


}
